# /*
#  * @Descripttion: 
#  * @version: V1.0.0
#  * @Author: Maverick
#  * @Date: 2025-03-15 20:18:02
#  * @LastEditors: Maverick
#  * @LastEditTime: 2025-03-15 20:21:12
#  */


#目标产物
SRC_FILES:=$(wildcard *.cpp)
OBJ:=$(SRC_FILES:.cpp=.o)
OBJ:=main.o sqlist.o
.PHONY:all

all:$(BIN)
$(BIN):$(OBJ)
	@echo "$(TAG):$^ \n"
	@$(CC) $(CFLAGS) $^ -o $@
	@sudo mv -f $(BIN) $(BUILD_DIR)
	@echo "$(TAG):$@ \n"

%.o:%.cpp
	@echo "$(TAG):$< \n"
	@$(CC) $(CFLAGS) -c  $<  -o $@


.PHONY:clean
clean:
	@echo "$(TAG):clean begin \n"
	@sudo rm -rf $(SRC_DIR)/*.o $(TEST_DIR)/*.o $(BUILD_DIR)/*.o $(BUILD_DIR)/$(BIN)
	@sudo rm -rf  $(BUILD_DIR)/$(OBJ)
	@sudo rm -rf  $(BUILD_DIR)/$(BIN)
	@echo "$(TAG):clean over \n"
